/**
 * Created by sunshine on 17-4-24.
 */
$(document).ready(function () {
    var list = [$('#list1'), $('#list2'), $('#list3')];

    function listClick(that) {
        for (i in list) {
            list[i].removeClass('active');
        }
        that.addClass('active');
        if (that == list[0]) {
            $('#iframe').attr('src', 'userinfo');
            //location.hash = '#userinfo';
        } else if (that == list[1]) {
            $('#iframe').attr('src', 'loginlog');
            //location.hash = '#loginlog';
        } else if (that == list[2]) {
            $('#iframe').attr('src', 'dolog');
            //location.hash = '#dolog';
        }
    }

    list[0].click(function () {
        listClick(list[0])
    });
    list[1].click(function () {
        listClick(list[1])
    });
    list[2].click(function () {
        listClick(list[2])
    });


});

